package com.atguigu.gulimall.authserver.service;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.authserver.vo.SocialUser;
import com.atguigu.gulimall.authserver.vo.UserLoginVo;
import com.atguigu.gulimall.authserver.vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 860620068
 * @Date 2021/6/10 :16:00
 * @desceiption:
*/
@FeignClient("gulimall-member")
public interface MemberFeignService {
    @PostMapping(value = "/memeber/member/register")
    R register(@RequestBody UserRegisterVo vo);

    @PostMapping(value = "/memeber/member/login")
    R login(@RequestBody UserLoginVo vo);

    @PostMapping(value = "/memeber/member/oauth2/login")
    R oauthLogin(@RequestBody SocialUser socialUser) throws Exception;

    @PostMapping(value = "/memeber/member/weixin/login")
    R weixinLogin(@RequestParam("accessTokenInfo") String accessTokenInfo);
}
